<template>
	<view class="richTexPage">
		<!-- #ifdef APP -->
		<u-navbar :title="textTitle" :autoBack="true" bgColor="#ffffff"></u-navbar>
		<!-- #endif -->
		<view :style="{marginTop: $u.addUnit($u.getPx(44) + $u.sys().statusBarHeight,'px')}"></view>
		<view class="richTextBox" >
			<u-parse :content="textContent"></u-parse>
		</view>
		<view class="fillBoox"></view>
	</view>

</template>

<script>
	export default {
		data() {
			return {
				agreement: null,
				textTitle: "",
				textContent: "", //文本内容
			}
		},
		onLoad(options) {
			if (options && options.biaoshi) {
				this.agreement = options.biaoshi
				this.getAgreementArticle()
			}
		},
		methods: {
			//获取文本内容
			getAgreementArticle() {
				this.$Api['common'].getAgreementArticle({
					biaoshi: this.agreement
				}).then(res => {
					this.textTitle = res.data.name
					this.textContent = res.data.content
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.richTexPage {
		min-height: 100vh;
		background-color: #f4f8fb;

		.richTextBox { 
			padding: 20rpx 40rpx; 
			background-color: #ffffff;
		}
		.fillBoox{
			height: 40rpx;
		}
	}
</style>